﻿/**
 * @file MainForm
 *
 * @brief 
 *
 * @author gyzheng
 *
 * @mail gyazheng@gmail.com
 *
 * @date 07/27/2011 22:37:51 
 *
 */
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using CarFrameWork.Common;
using CarFrameWork.Model;

namespace CarFrameWork.UI.SystemManage.UserManage
{
    public partial class EditUserForm : UserFormBase
    {
        public EditUserForm(UserInfo user)
        {
            InitializeComponent();
            m_UserInfo = user;
        }

        private void EditUserForm_Load(object sender, System.EventArgs e)
        {
            SetTitle("编辑用户");
            SetUserToForm();
        }

        private void okBtn_Click(object sender, EventArgs e)
        {
            if (!TestContent())
            {
                MessageBox.Show("数据项不能为空。", "提示！");
                return;
            }
            GetFormToUser();
            m_UserInfo.UserID = Convert.ToInt32(txtuserId.Text);
            m_UserInfo.Update();
            this.Close();
        }
    }
}
